Internal combustion engines including diesel engines produce a number of combustion products including particulates, hydrocarbons (“HC”), carbon monoxide (“CO”), oxides of nitrogen (“NOx”), oxides of sulfur (“SOx”) and others. Future diesel engines may be required to reduce these and other emissions. Aftertreatment systems may include oxygen sensors operable to measure or sense O2 in exhaust in order to achieve desired efficiency and/or desired regeneration of aftertreatment system devices. There is a need for adaptive oxygen sensor methods, systems, and software.